<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/OSL/layui/css/layui.css">
    <link rel="stylesheet" href="../lib/css/page/lab_appointment_manage.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">
            <span>宿舍床位状态</span>
        </div>
        <!-- 卡片区域  -->
        <div class="layui-card-body">
            <!-- 搜索区域   -->
            <form class="layui-form" id="form_search">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">宿舍名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="lab_class_name" placeholder="请输入宿舍名称" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">楼栋名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="lab_address" placeholder="请输入楼栋名称" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class=" layui-form-label">入住状态</label>
                    <div class="layui-input-block">
                        <select class="select" name="status">
                            <option></option>
                            <option value="1">已住满</option>
                            <option value="2">未住满</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <div style="margin-left: 10px;">
                        <button class="layui-btn btn_search" lay-submit lay-filter="formDemo">搜索</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
            <!-- //数据区 -->
            <table class="layui-table">
                <colgroup>
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <!-- <col /> -->
                    <!-- <col />  -->
                </colgroup>
                <thead>
                    <tr>
                        <th>宿舍名称</th>
                        <!-- <th>宿舍管理员</th> -->
                        <!-- <th>管理员电话</th> -->
                        <th>所属楼栋</th>
                        <th>总床位</th>
                        <th>剩余床位</th>
                        <th>入住状态</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- //分页区域 -->
            <div id="pageBox"></div>
        </div>
    </div>
    <!-- ---------------------------------------------------------------- -->
    <!-- 获取所有实验室的列表 -->
    <script type="text/html" id="tpl_lab_list">
        {{each data}}
        <tr>
            <th>{{$value.lab_class_name}}</th>
            <th>{{$value.lab_address}}</th>
            <th>{{$value.gross}}</th>
            <th>{{$value.residue}}</th>
            {{if $value.residue !==0}}
            <td style="text-align:center !important">
                <button type="button" class="layui-btn layui-btn-xs" disabled="true"
                    style="cursor:default;background-color: #277be2;">未住满</button>
            </td>
            {{else}}
            <td style="text-align:center !important">
                <button type="button" class="layui-btn layui-btn-warm layui-btn-xs" disabled="true"
                    style="cursor:default;background-color: #ff0d35;">已住满</button>
            </td>
            {{/if}}
            <!-- <th>
                {{if $value.lab_class_appointment_person ==null}}
                <button type="button" class="layui-btn layui-btn-sm btn_appointment" data_id="{{$value.id}}">预约</button>
                {{else}}
                <button type="button" class="layui-btn layui-btn-danger layui-btn-sm btn_cancel"
                    data_id="{{$value.id}}">归还实验室</button>
                {{/if}}
            </th> -->
        </tr>
        {{/each}}
    </script>
    <!-- ---------------------------------------------------------------- -->
    <script src="../lib/OSL/jquery.js"></script>
    <script src="../lib/OSL/layui/layui.all.js"></script>
    <script src="../lib/js/baseAPI.js"></script>
    <script src="../lib/OSL/template-web.js"></script>
    <script src="../lib/js/page/lab_appointment_manage.js"></script>
</body>

</html>